package com.reservationserver.Myrunner;

import com.reservationserver.mapper.admin.AdminBadmintonMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class Myrunner implements CommandLineRunner {

    private final AdminBadmintonMapper adminBadmintonMapper;

    @Override
    public void run(String... args) {
        if(adminBadmintonMapper.serepeate().isEmpty()){
            log.info("插入isrepeate数据");
            adminBadmintonMapper.inrepeate();
        }
    }
}
